class Solution {
public:
    vector<int> singleNumber(vector<int>& nums) {
        unordered_map<int,int> hash;
        vector<int> ret;
        for(int i=0;i<nums.size();++i)
        {
            hash[nums[i]]++;
        }
        for(int i=0;i<nums.size();++i)
        {
            if(hash[nums[i]]==1)
            {
                ret.push_back(nums[i]);
            }
        }
        return ret;
    }
};
